package com.yulongtian.interviewWorks.day20220826;

/**
 * https://leetcode.cn/problems/magic-index-lcci
 * @author YulongTian
 * @date 2022/8/26 - 16:18
 */
public class Test07 {
    public static void main(String[] args) {

    }

    public int findMagicIndex(int[] nums) {
        for(int i=0;i<nums.length;i++){
            if(nums[i]==i){
                return i;
            }
        }
        return -1;
    }

}
